package reviews.task1;


public class ProductScore implements Comparable<ProductScore> {


    /**
     * 产品ID
     */
    private String productId;

    /**
     * 平均分
     */
    private Double scoreValue;

    public ProductScore() {
    }

    public ProductScore(String productId, Double scoreValue) {
        this.productId = productId;
        this.scoreValue = scoreValue;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Double getScoreValue() {
        return scoreValue;
    }

    public void setScoreValue(Double scoreValue) {
        this.scoreValue = scoreValue;
    }

    @Override
    public int compareTo(ProductScore o) {
        return o.getScoreValue().compareTo(this.getScoreValue());
    }
}
